import axiosInstance from '@/request/axios-config'

// 查询数据源
export const getListService = () => {
    return axiosInstance.get("/generatorDatasource/getList")
}

// 修改数据源
export const editService = (data: any) => {
    return axiosInstance.put("/generatorDatasource/edit", data)
}

// 添加数据源
export const addService = (data: any) => {
    console.log("addService==", data)
    return axiosInstance.post("/generatorDatasource/add", data)
}

// 删除数据源
export const deleteService = (ids: any) => {
    return axiosInstance.post("/generatorDatasource/delete", ids)
}


// 代码生成
export const generatorService = (data: any) => {
    return axiosInstance.post("/generatorDatasource/generator", data)
}

// 根据id获取数据源信息
export const getById = (id: any) => {
    return axiosInstance.get('/generatorDatasource/getById', {
        params: {id: id}
    })
}
